<template>
  <div>
    <van-grid>
      <van-grid-item :icon="item.pic" :text="item.name" v-for="item in classifyshop" :key="item.id"/>
    </van-grid>
  </div>
</template>

<script>
export default {
    data() {
        return {
            classifyshop:[]
        }
    },
    mounted() {
        var id = this.$route.query.id
        console.log(id);
        this.$API.getList(id).then(res=>{
            console.log(res);
            this.classifyshop = res.data.data.filter(item=>{
                if(item.categoryId == id){
                    return item
                }
            })
            console.log(this.classifyshop);
        })
    },
};
</script>

<style>
</style>